package com.base.util;


/**
 * 
 * @author limingxing
 * @Date:2016-1-7上午10:57:58
 * @email:limingxing_aqgy@sina.com
 * @version:1.0
 */
public final class Hex {

	public Hex() {
	}

	public static char[] encode(byte bytes[]) {
		int nBytes = bytes.length;
		char result[] = new char[2 * nBytes];
		int j = 0;
		for (int i = 0; i < nBytes; i++) {
			result[j++] = HEX[(240 & bytes[i]) >>> 4];
			result[j++] = HEX[15 & bytes[i]];
		}

		return result;
	}

	private static final char HEX[] = { '0', '1', '2', '3', '4', '5', '6', '7',
			'8', '9', 'a', 'b', 'c', 'd', 'e', 'f' };

}


/*
	DECOMPILATION REPORT

	Decompiled from: E:\workspacestest\ss\WebRoot\WEB-INF\lib\spring-security-core-3.1.0.M1.jar
	Total time: 28 ms
	Jad reported messages/errors:
	Exit status: 0
	Caught exceptions:
*/